<script setup lang="ts">
import { init, destory } from "./create";
import { onMounted, onUnmounted, ref } from "vue";
const canvas = ref<any>(null);

onMounted(() => {
    canvas.value.width = window.innerWidth;
    canvas.value.height = window.innerHeight;
    init(canvas.value);
});

onUnmounted(() => {
    document.body.style.touchAction = '';
    destory();
})
</script>

<template>
    <canvas ref="canvas"></canvas>
</template>

<style lang="less" scoped>
@import url("./index.less");
</style>
